package org.example.consumer;

import java.util.function.Consumer;
import java.util.function.DoubleConsumer;
import java.util.function.IntConsumer;
import java.util.function.LongConsumer;

public class Test01 {

    public static void main(String[] args) {
        //消费性接口：(T) -> void
        Consumer<String> consumer = (a) -> System.out.println(a);
        consumer.accept("B班");


        IntConsumer intConsumer = (a) -> System.out.println(a * a);
        intConsumer.accept(1);

        LongConsumer longConsumer = (l)-> System.out.println(l/l);
        longConsumer.accept(10L);

        DoubleConsumer doubleConsumer = (d)-> System.out.println(d+d);
        doubleConsumer.accept(1.2);
    }
}
